package com.itheima.advice;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(100)//越小越优先 先进后出
public class AAdvice {

    @Pointcut("@annotation(com.itheima.advice.LogOperation)")
    public void pt(){
    }
    @Before("pt()")
    //执行原方法之前
    public void before(){
        System.out.println("执行了before方法.................执行原方法之前");
    }

}
